/*
 * File used by the create event page to generate
 * a createEvent request and react to the response
 * 
 * Author: Chris Casola
 */

/**
 * Responds when the event is created
 */
function handleCreateEventResponse(response) {	
	if (response.success == "true") {
		sessionStorage['isModerator'] = true;
		sendRequest(new signInRequest(window.dlEvent.username, response.createResponse.id))
		sessionStorage['gameid'] = response.createResponse.id;
		alert("Give your friends this url: "+ window.location.href + "?" + response.createResponse.id);
	}
	else {
		alert("Unable to create the event!");
	}
}